SetGfxDriver 1:Graphics 1024,768,8,2:SeedRnd MilliSecs() :SetBuffer FrontBuffer() 
Global entr,timer,nums,numz,numt,numx,numw,lz,wflag,lw,z,z1,errorflag,frames,iterated,citr,zw,lplen,lptr,lframes,literated,yadro,lyadro,prostir
yadro=256: prostir=4096
;timer = CreateTimer(100) :nums = CreateBank(prostir+2)
For i = 0 To prostir-1 
t = Rand(0,yadro-1);:PokeByte nums,i, t
Next 

While Not KeyHit(1) 
ClsColor 0,0,0
Cls
z=0:z9=0:z8=0
For i1 = 0 To 96
 For i = 0 To 48
t = Rand(0,yadro-1)
If(t>127 And t1>127 And t1>t); And t2>127 And t3>127 And t4>127) 
;Color 255,0,255 :z9=z9+1

Else
If (t>127 )
 Color 0,255,0 
Else 
Color 0,100,0: z =z+1
EndIf
    
If(t<127 And t1<127 And t1<t)
; Color 0,255,255 :z8=z8+1
Else 

EndIf
EndIf
t4=t3:t3=t2:t2=t1:t1=t
;    If ((i1*48+i+t)<(96*48) )Then Color 0,0,255 Else Color 255,0,0: z =z+1
    Text 9+18+i*20,18+i1*7,t,False ,False 
    ;If i1>87 Text 9+18+i*4,18+i1*7,"O",False ,False 
       cnt=cnt+1


Next
Next

Color 0,255,0: Text 9+18+0*20,18+98*7,96*48+" " +z+" " +z9+ " " + z8,False ,False

Flip 
;If KeyHit(57) > 0 
WaitMouse()
Wend 